package com.basic.datastructure.compare;

import java.util.Comparator;

public class ComparatorCompare<T> implements Compare<T> {

	private Comparator<T> comparator;

	public ComparatorCompare(Comparator<T> comparator) {
		this.comparator = comparator;
	}

	@Override
	public int compare(T t1, T t2) {
		return comparator.compare(t1, t2);
	}

}
